﻿using SimpleMvcCaptcha.Utils;

namespace SimpleMvcCaptcha.Helper
{
    public class CaptchaParameters
    {
        public CaptchaParameters()
        {
            MaxNumber = Config.MaxNumber;
            PlusOperationText = Config.PlusOperationText;
            MinusOperationText = Config.MinusOperationText;
            CaptchaController = Config.CaptchaController;
            CaptchaAction = Config.CaptchaAction;
            SecretKey = Config.SecretKey;
            Salt = Config.Salt;
            MaxRandomLines = Config.MaxRandomLines;
            Width = Config.Width;
            Height = Config.Height;
            FontName = Config.FontName;
            FontSize = Config.FontSize;
        }

        /// <summary>
        /// Maximum number for captcha's expression operands
        /// </summary>
        public int MaxNumber { get; set; }

        /// <summary>
        /// Text to substitute "+" operation
        /// </summary>
        public string PlusOperationText { get; set; }

        /// <summary>
        /// Text to substitute "-" operation
        /// </summary>
        public string MinusOperationText { get; set; }

        /// <summary>
        /// Name of controller to get image
        /// </summary>
        public string CaptchaController { get; set; }

        /// <summary>
        /// Name of action to get image
        /// </summary>
        public string CaptchaAction { get; set; }

        /// <summary>
        /// Secret key for string encription
        /// </summary>
        public string SecretKey { get; set; }

        /// <summary>
        /// Salt for encription
        /// </summary>
        public string Salt { get; set; }

        /// <summary>
        /// Max amount of captcha's random lines
        /// </summary>
        public int MaxRandomLines { get; set; }

        /// <summary>
        /// Captcha's image width
        /// </summary>
        public int Width { get; set; }

        /// <summary>
        /// Captcha's image height
        /// </summary>
        public int Height { get; set; }

        /// <summary>
        /// Captcha's expression font name
        /// </summary>
        public string FontName { get; set; }

        /// <summary>
        /// Captcha's expression font size
        /// </summary>
        public int FontSize { get; set; }
    }
}
